Imports System.Web.Services

Partial Class logoutPage
    Inherits System.Web.UI.Page

    Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogin.Click
        Session("CurrentUser") = Nothing

        If (UserAuthorization.LoginUser(Me.userId.Text, Me.password.Text)) = True Then
            Try
                FormsAuthentication.RedirectFromLoginPage(UserAuthorization.CurrentUser.LogonId, False, "/")
            Catch ex As Exception
                Response.Redirect("default.aspx")

            End Try
        End If
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Session("CurrentUser") = Nothing
        Session("ParticipantId") = Nothing
        System.Web.Security.FormsAuthentication.SignOut()
        Response.Redirect("login.aspx")
    End Sub
End Class
